<!doctype html>
<html>
<head>
	<meta http-equiv="Content-Type" Content="text/html; charset=utf-8"/>
	<link rel="stylesheet" type="text/css" href="../css/header.css">
	<link rel="stylesheet" type="text/css" href="../css/accessContest.css">
	<link rel="stylesheet" type="text/css" href="../css/footer.css">
	<link rel="stylesheet" href="../res/bootstrap/css/bootstrap.min.css">
	<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.1.js"></script>
	<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.4/jquery-ui.js"></script>
	<script src="//netdna.bootstrapcdn.com/bootstrap/2.3.2/js/bootstrap.min.js"></script>
	<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.21/angular.min.js"></script>
	<script src="../myUtil.js"></script>
	<script type="text/javascript" src="../js/accessContest.js"></script>
	<body ng-app="myModule">
<div class="container" ng-controller="MyController">
<!-- header-->
<div class="header span12"></div>

<h1>대회참가신청 승인</h1>대회에 참가신청한 팀 목록입니다.

<div ng-repeat="item in contest_regItems">
	{{item.name + item.count + "회차"}}
	
	<table class="table">
		<thead>
			<tr>
				<td>팀명</td>
				<td>주제</td>
				<td>팀명단보기</td>
				<td>제안서</td>
				<td>승인/거절</td>
			</tr>
		</thead>
		<tbody ng-repeat="team in teamItems" ng-if="item.contest_reg_id==team.contest_reg_id">
			<tr>
				<td>{{team.team_name}}</td>
				<td>{{team.track_name}}</td>
				<td><a class="btn btn-small" ng-click="loadUser($index,team.team_id)">보기</a></td>
				<td><a class="btn btn-small" ng-click="proposalDownload(team.proposal)">다운로드</a></td>
				<td><a class="btn btn-small btn-primary" ng-click="$parent.access($index)">승인</a>
					<a class="btn btn-small" ng-click="accessNo($index)">거절</a></td>
			</tr>
			
			<tr ng-style="borderbottom" style="background-color:lightgray;" ng-if="selectedIndex==$index">
				<td>팀명</td>
				<td>직책</td>
				<td>이름</td>
				<td>학번</td>
				<td>학과</td>
				
			</tr>
			<tr ng-style="borderbottom" style="background-color:#eee;"  ng-if="selectedIndex==$parent.$index" ng-repeat="user in userItems"> 
				<td>{{team.team_name}}</td>
				<td>{{user.position}}</td>
				<td>{{user.name}}</td>
				<td>{{user.id}}</td>
				<td>{{user.major}}</td>
			
			</tr>
			

		</tbody>
	</table>
</div>
	<div class="footer span12"></div>
<!--//footer-->
</div>
</body>
</html>